﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ZFY.Blog.Api.Model;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace ZFY.Blog.Api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    
    public class ApiBaseController : ControllerBase
    {
        protected  ReponseModel CreateReponse(string msg, object data = null, bool success = false,int statusCodes = StatusCodes.Status400BadRequest)
        {
            HttpContext.Response.StatusCode = statusCodes;
            return new ReponseModel { data = data, msg = msg, success = success };
        }
    }
}